package com.zzyl.nursing.controller.member;

import com.huaweicloud.sdk.iotda.v5.model.Page;
import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.dto.OrdersProjectPageDto;
import com.zzyl.nursing.service.INursingProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description OrdersProject
 * @Author zhanganliang
 * @Date 2025-03-02  16:35
 */

@Api("小程序端-服务项接口")
@Slf4j
@RestController
@RequestMapping("/member/orders")
public class OrdersProject extends BaseController {
    @Autowired
    private INursingProjectService nursingProjectService;
    @ApiOperation("分页查询护理项目列表")
    @GetMapping("/project/page")
    public TableDataInfo pageForNursingProject(OrdersProjectPageDto ordersProjectPageDto)
    {

        log.info("分页查询护理项目列表:{}",ordersProjectPageDto);
        return nursingProjectService.pageForNursingProject(ordersProjectPageDto);
    }
    @ApiOperation("根据编号查询护理项目信息")
    @GetMapping("/project/{id}")
    public R<NursingProject> queryByIdForNursingProject(@PathVariable Integer id )
    {
        log.info("根据编号查询护理项目信息:{}",id);
        return R.ok(nursingProjectService.queryByIdForNursingProject(id));
    }
}
